import React from 'react';
import { Modal, Tabs } from 'antd';
import { PlanTimeListParams } from '../data.d';
import styles from '../index.less';

interface CreateFormProps {
  modalVisible: boolean;
  values:PlanTimeListParams;
  onCancel: () => void;
}

const { TabPane } = Tabs;

const dataSourceModel: React.FC<CreateFormProps> = (props) => {
  const { modalVisible, values, onCancel } = props;

  function callback(key) {
    console.log(key);
  }

  return (
    <Modal
      className={styles.ProgramModel}
      // width={900}
      destroyOnClose
      centered
      title="数据源"
      visible={modalVisible}
      values={values}
      footer={null}
      onCancel={() => onCancel()}
    >
      <section className={styles.tabContainer}>
          <Tabs onChange={callback} type="card">
            <TabPane tab="商品详情" key="1">
            </TabPane>
            <TabPane tab="更新历史" key="2">
            </TabPane>
          </Tabs>
        </section>
    </Modal>
  );
};

export default dataSourceModel;
